package com.framework.dao.flow;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.framework.entity.flow.FlowAgentIntegral;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wq
 * @date 2019/9/26 16:02
 * @description
 */
public interface FlowAgentIntegralDao extends BaseMapper<FlowAgentIntegral> {

    @Select("select flow_id as flowId,agent_id as agentId,income_type as incomeType," +
            "integral,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%s') as showTime,remark,type" +
            "from flow_agent_integral where agent_id=#{agentId} order by create_time desc")
    List<FlowAgentIntegral> queryIncomeList(Long agentId);
}
